import os
import sys
import django

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(BASE_DIR)

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings.dev")
django.setup()  #模拟启动

from Tbug import models
# 往数据库中插入数据

models.UserInfo.objects.create(
    username='River', 
    email='123@qq.com', 
    mobile_phone='13812345678', 
    password='123')